# 可变参数
def total(*args):
    print(args)
    a = 0
    for i in args:
        a += i
    return a


print(total(1, 2, 3, 4, 5, 6))
print(total(*[1, 2, 3, 4, 5]))


# 字典可变参数
def f(**keyword):
    print(keyword)
    for v, k in keyword.items():
        print(v, "   : ", k)


d = {
    'name': '??',
    'age': 18
}
# 字典类型 前面一定要有 **
f(**d)
f(name="Alice", age=30)
